From: cl349@freefall.cl.cam.ac.uk Date: Wed, 6 Oct 2004 14:03:33 +0000 (+0000) Subject: bitkeeper revision 1.1159.1.211 (4163fb35XBjUO8_fLeyomd3I9mHZOA) X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~17400^2~540 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=74de9572477777b5edef45fe6c852362097c8611;p=xen.git bitkeeper revision 1.1159.1.211 (4163fb35XBjUO8_fLeyomd3I9mHZOA) Get rid of delay between finishing the transfer of a domain and when it gets to run. --- diff --git a/tools/libxc/xc_linux_restore.c b/tools/libxc/xc_linux_restore.c index 3973c85225..93b78c4c87 100644 --- a/tools/libxc/xc_linux_restore.c +++ b/tools/libxc/xc_linux_restore.c @@ -689,8 +689,19 @@ int xc_linux_restore(int xc_handle, XcIOContext *ioctxt) op.u.builddomain.ctxt = &ctxt; rc = do_dom0_op(xc_handle, &op); - /* don't start the domain as we have console etc to set up */ - + if ( rc != 0 ) + { + xcio_error(ioctxt, "Couldn't build the domain"); + goto out; + } + + if ( ioctxt->flags & XCFLAGS_CONFIGURE ) + { + op.cmd = DOM0_UNPAUSEDOMAIN; + op.u.unpausedomain.domain = (domid_t)dom; + rc = do_dom0_op(xc_handle, &op); + } + if ( rc == 0 ) { /* Success: print the domain id. */ diff --git a/tools/xfrd/xen_domain.c b/tools/xfrd/xen_domain.c index feb0d9d02b..6f25405382 100644 --- a/tools/xfrd/xen_domain.c +++ b/tools/xfrd/xen_domain.c @@ -138,9 +138,8 @@ int xen_domain_rcv(IOStream *io, ioctxt->info = iostdout; ioctxt->err = iostderr; ioctxt->configure = domain_configure; - if(!configured){ + if ( !*configured ) ioctxt->flags |= XCFLAGS_CONFIGURE; - } err = xc_linux_restore(xcinit(), ioctxt); *dom = ioctxt->domain; diff --git a/tools/xfrd/xfrd.c b/tools/xfrd/xfrd.c index 2a73d7a64b..5da736f6a9 100644 --- a/tools/xfrd/xfrd.c +++ b/tools/xfrd/xfrd.c @@ -863,9 +863,9 @@ int xfr_recv(Args *args, XfrState *state, Conn *peer){ dprintf("> Configuring...\n"); err = xen_domain_configure(state->vmid_new, state->vmconfig, state->vmconfig_n); if(err) goto exit; + err = xen_domain_unpause(state->vmid_new); + if(err) goto exit; } - err = xen_domain_unpause(state->vmid_new); - if(err) goto exit; // Report new domain id to peer. err = xfr_send_xfr_ok(peer, state->vmid_new); if(err) goto exit;